package view.component.window
{
import flash.geom.Point;

import framework.view.components.Component;

/**
 * WindowComponent
 * @author jliang
 *
 */
public class WindowComponent extends Component
{
	//==========================================================================
	//  Constructor
	//==========================================================================
	public function WindowComponent()
	{
		super();
	}
	//==========================================================================
	//  Overridden methods: DisplayObject
	//==========================================================================
	protected function get window():WindowProxy
	{
		return proxys["window"];
	}
	
	override public function initialize():void
	{
		super.initialize();
		
		window.component = this;
	}
	//==========================================================================
	//  Public methods
	//==========================================================================
	public function show(lock:Boolean = true, position:Point = null, ...args):void
	{
		window.show.apply(window, [lock, position].concat(args));
	}
	
	public function close():void
	{
		window.close();
	}
}
}


